﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="Demo._Default" %>

<asp:Content  runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content  runat="server" ContentPlaceHolderID="NoInPageTitle">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h3>
        What is it?
    </h3>
    <hr />
    <p>
        <a href="http://en.wikipedia.org/wiki/Rapid_application_development" class="black-link">RAD</a> framework built on top of <a href="http://en.wikipedia.org/wiki/ASP.NET" class="black-link">ASP.NET</a> that enables you to write web applications using <a href="http://en.wikipedia.org/wiki/MVVM" class="black-link">MVVM</a> paradigm.
    </p>
    <div style="height:10px;"></div>
    <h3>
        Why to use it</h3>
        <hr />
    <div class="row-fluid">
            <img src="/img/Comparison.jpg" alt="" class="normal-img" style="float:right;"/>
            <blockquote class="quote">
            <ul>
                <li>
                Have you ever find yourself in situation where you weren't sure, should I write
                this OnLoad, OnPreRender, On....?
                </li>
                <li>
                Have you read all those books about ASP.NET, but somehow felt that they were missing
                the point?
                </li>
                <li>
                Have you ever maintained someone else's code, just gave up and rewrote everything
                from scratch because you couldn't understand how it works?
                </li>
            </ul>
            </blockquote>
            <p>
                Since you are here, that means that you are looking for a better way to write your
                ASP.NET web applications.</p>
            <p>
                Using this framework, you stop battling with ASP.NET and start being productive.</p>
            <p>
                <i>This framework is completely compatible with ASP.NET 3.5, 4.0, Ajax so you can freely mix Carbon enabled controls and regular ASP.NET controls.</i></p>
                <a href="#" title="Compatible with ASP.NET 3.5, 4.0" class="logo-compatibility asplogo"></a>
                <a href="#" title="Optimized for Visual Studio 2010+" class="logo-compatibility vslogo"></a>
    </div>
    <div style="padding-top: 30px;">
    </div>
        <h3>
            About the framework
        </h3>
        <hr />
        <p>
            You can look at this framework as a 'style cop' for ASP.NET. It enables you to write
            web applications that are perfectly consitent with the ASP.NET philosophy without
            of the boring plumbing work. That's why you can easily extract part's of the view
            (.ascx/.aspx files), and wrap them in the separate user controls that work seamlessly
            with each other.
        </p>
        <p>
            So what are the main components of this framework:
        </p>
            <ul class="car-parts">
                <li><b>Core</b> - That's the core of the system that takes care of the low level data binding
                    process and enforces that everything happens in correct stages of ASP.NET processing
                    pipeline.</li>
                <li><b>Form</b> - The <i>Core</i> project doesn't have any useful user interface controls.
                    <i>Forms</i> project is a simple implementation of this framework that uses jQuery
                    UI javascript plugins/extensions and integrates them with this framework. It
                    demonstrates how you can wrap any regular ASP.NET control and make them Carbon enabled. That means that you can use any thrid part controls
                    like Telerik or DevExpress and integrate them with this framework.</li>
                <li><b>MongoDbSupport</b> - This project enables you to integrate this project with MongoDb
                    databases for ultra fast server state storage and uploaded files storage (default
                    implementation uses SQL server database). </li>
                <li><b>Demo</b> - Demonstrates this project capabilities so you can hit F5 and </li>
            </ul>
        <blockquote class="quote">
            When you will try to hit F5 in <i>Demo project</i>, don't forget, your <b>password for Carbon.pfx is <i>carbonmvvm</i></b>.
        </blockquote>
        <div style="padding-top: 30px;">
        </div>
        <h3>
            How it relates to other MVVM frameworks
        </h3>
        <hr />
        <p>
            Almost every MVVM framework requires observable objects. If you've used some other
            Microsoft technologies you might have noticed INotifyPropertyChanged interface.
            That interface enables detection of changes on observable objects and enables automatic
            UI updates. It is also one of the greatest weaknesses because that only works
            well on properties that are used for simple information storage (like string, int ... properties). If you have some more complex computational logic,
            you will need to manually write code that invokes observer methods for each of the
            data dependancies changes, or you will need to figure out some other way how to
            solve this problem.
        </p>
        Web environment is specific because the whole user interface is redrawn for each
        request so you don't actually need to track the view model changes and update only
        parts of the interface. This is not specifically related to this framework, but
        to the ASP.NET and other web technologies.<br />
        <blockquote class="quote">Strictly speaking, that's not entirely true, you need to track changes in the view model so you could correctly update UI and 
        preserve control view state. You can solve this problem by traversing the view model twice and detect changes that way, in any case, the end result is the same. You
        don't need observables and hence, you can boost you development time.</blockquote>
        <p>
        </p>
        <h3>
        <a name="examples" class="in-page-anchor"></a>
           Examples</h3>
        <hr />
        <p>
            These examples will demonstrate the basic concepts and benefits of using this framework.
            They are ordered from the simplest ones to the most complex ones. Each of them has
            a function of a tutorial, demonstration and a practical documentation of this framework.</p>
        <p>
            Although this project lacks formal documentation, in this phase this shouldn't cause
            any concerns. If you know some basic concepts of ASP.NET you will be able to implement
            your custom logic after studing these examples thoroughly.
        </p>
        <p>
            Above each of the examples is rendered a line counter that should help illustrate how much lines of
            code must you write to implementent demonstrated logic. If you have any experience with
            normal ASP.NET, you will probably notice that this line count is very small comparing
            it to the line count of the non Carbon MVVM enabled web application.
        </p>
            <table class="table table-bordered table-striped">
                <col width="200" />
                <tr>
                    <th>
                        Example
                    </th>
                    <th>
                        Description
                    </th>
                </tr>
                <% foreach (Demo.Example example in Demo.Examples.AllExamples)
                   { %>
                <tr>
                    <td>
                        <a href="<%: example.Url %>">
                            <%: example.Title %></a><% if (example.IsNew)
                                                       { %>
                        <img src="/img/new.gif" alt="New" />
                        <%} %>
                    </td>
                    <td>
                        <%: example.Description %>
                    </td>
                </tr>
                <% } %>
            </table>
        <h3>
            We need you support</h3>
        <hr />
        <p>
            Since this project is not yet supported by anyone it needs your help.</p>
        <p>If you have some skills that you are
            willing to share with the world
        </p>
        <ul>
            <li>Programming skills</li>
            <li>Designer skills</li>
            <li>Lecturing skills</li>
            <li>Creativity outbursts</li>
            <li>HTML/javascript wizzard</li>
            <li>Native english (german, spanish ...) speaker (author is not)</li>
            <li>Complaining skills - yes, we do want to hear what you don't like</li>
        </ul>
        <p>
        please <a href="mailto:<%= DemoConstants.ContactEmailAddress %>">contact us</a></p>

        <p>
        <blockquote class="quote">
        We are aware that building open source system over a closed source platform is a weird descision, but the goal of this project is to become more then an ASP.NET rider. The core
        principles of this system empower you to develop desktop/web/mobile applications using the same logic and language, so stay tuned.
        </blockquote>
        </p>
</asp:Content>
